﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Nservice.Sales.Messages;
using NServiceBus;

namespace Nservice.Sales.Server
{
    public class CancelOrderHandler: IHandleMessages<CancelOrder>
    {
        public IBus Bus { get; set; }

        public void Handle(CancelOrder message)
        {
            Console.WriteLine("Cancel Order: OrderID: {0}",message.OrderId);
            Bus.Return(CommandStatus.Success);
        }
    }
}
